package com.study.service;

import com.study.entity.User;
import com.study.mapper.UserMapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

/**
 * @ClassName UserService
 * @Description TODO
 * @Author ThinkPad
 * @Date 2020/11/10 20:40
 * @Version 1.0
 **/
@Service
public class UserService {
    @Autowired
    private UserMapper userMapper;
    public User queryUserById(Integer id){
        return userMapper.selectByPrimaryKey(id);
    }

    public void save(User user){
       userMapper.insertSelective(user);
        System.out.println("正在保存User");
    }
}
